<!DOCTYPE html>
<html>
<head>
    <title>List</title>
    <style type="text/css">
        #window-resizer-tooltip{
            display: none;
        }
        td,th{
            border: 1px solid red;
            padding: 5px;
        }
    </style>
</head>
<body>

<?php include_once "core/config.php" ;?>

<a href="javascript:history.go(-1)">Back</a>
<br />
<?php
if(!$conn_mysql){
    echo "ko the ket noi den server database. Loi: " . mysql_error();
}else{
    if(!$db_test){
        echo "ko the ket noi den Database: Test. Loi: " . mysql_error();
    }else{
        $sql_query="select * from contact";
        $result = mysql_query($sql_query, $conn_mysql);
        if (!$result) {
            echo "loi truy van: " . mysql_error();
        }
    }
}
;?>

<table style="border: 1px solid red;border-collapse: collapse;">
    <tr>
        <th>Id</th>
        <th>Name</th>
        <th>Phone</th>
        <th>Sua</th>
    </tr>
    <tr style="display: none;">
        <td>-1</td>
        <td><a href="#">-hoang</a></td>
        <td>-phone</td>
        <td><a href="#">Sua</a></td>
    </tr>

<?php
while ($row = mysql_fetch_array($result)) {
    echo "<tr>".
            "<td>".
                $row["Id"].
            "</td>".
            "<td><a href='detail.php?Id=" . $row["Id"] . "'>" . $row["Name"] . "</a></td>" .
            "<td>".
                $row["Phone"].
            "</td>".
            "<td><a href='edit.php?Id=" . $row["Id"] . "'>Sua</a></td>" .
         "</tr>";
}
;?>
</table>



<?php include_once "core/ga.php" ;?>
</body>
</html>